var gt=$('<tr bgcolor="#1e84b4" class="STYLE6" id="gt"><td width="6%"><span class="STYLE1" ><input onclick='+'allChecked("allSelect","groups","group")'+' id="allSelect" type="checkbox"/>全选</span></td><td width="15%" >群组名称</td><td width="48%">群组描述</td><td width="7%">群组人数</td><td width="16%">详细/编辑</td><td width="8%">全部删除&nbsp;<img title="全部删除" src="images/delAll.gif" style="cursor:pointer" class="cursor1"/></td></tr>');
var ct;
var model="contacts";
var arry = new Array();
$(function(){
	getContact(0);
	ct=$("#ct").clone(true)
})

function allChecked(self,form,pre){
	arry = check_all(self,form,pre);
}

//动态改变arry数组
function oncheck(ob){
	var id=ob.id;
	id = id.substring(model.length-1);
	var state = $(ob).attr("checked");
	if(state){
		arry.push(id);
	}else{
		arry.splice($.inArray(id,arry),1);		
	}
}

function change() {
	var left = $("#left");
	var tree = $(".dtree");
	var dTreeNode = $(".dTreeNode");
	var button = $("#button");
	var width = tree.css("width");
	if(button.attr("state")=="true"){
		button.attr("src","images/splitter_r.gif");
		button.attr("title","点击打开菜单");
		button.attr("state","false");
		tree.animate({width:"0"},120);
		dTreeNode.hide();
		left.animate({width:"0"},120);
	}else{
		button.attr("src","images/splitter_l.gif");
		button.attr("state","true");
		button.attr("title","点击关闭菜单");
		dTreeNode.show();
		tree.animate({width:"120"},120);
	}
}

function addContact(){
	tb_show("添加新联系人","addContact.html?TB_iframe=true&height=400&width=600&modal=false",null);
}
function addGroup(){
	tb_show("添加新群组","addGroup.html?TB_iframe=true&height=200&width=650&modal=false",null);
}
function updateuser(){
	tb_show("修改我的资料","updateuser.jsp?TB_iframe=true&height=270&width=630&modal=false",null);
}
function changePassword(){
	tb_show("修改密码","changePassword.jsp?TB_iframe=true&height=160&width=530&modal=false",null);
}
function changeQuestion(){
	tb_show("修改密码保护问题","changeQuestion.jsp?TB_iframe=true&height=300&width=480&modal=false",null);
}
